package cn.huiyunche.base.service.enums;

public enum AttachTypeEnum {

    RECEIPT_BILL(1010, "提车单据"),
    RECEIPT_PHOTO(1020, "提车照片"),
    SEND_BILL(2010, "发车单据"),
    SEND_PHOTO(2020, "发车照片"),
    DELIVER_BILL(3010, "交车单据"),
    DELIVER_PHOTO(3020, "交车照片"),
    DELIVER_CAR_PHOTO(3030, "司机和车辆合影照片"),
    RECEIVE_BILL(4010, "收车单据"),
    RECEIVE_PHOTO(4020, "收车照片"),
    INJURED_PHOTO(5010, "带伤发运图片"),
    ACCIDENT_PHOTO(6010, "事故图片");

    private final int value;
    private final String text;

    AttachTypeEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static AttachTypeEnum getByValue(int value) {
        for (AttachTypeEnum temp : AttachTypeEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
